home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Light ROM 1
/
LIGHT-ROM 1 (Amiga Library Services)(1994).iso
/
ffdisks
/
d998.lha
/
TeXPrt
/
source
/
strings.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-04-05
|
2KB
|
41 lines
/*----------------------------- INCLUDES ----------------------------------*/
#include "TexPrt_protos.h"
/***************************************************************************
* *
* Function name : repchrstr *
* *
* Description : Replaces in a string a given character with another *
* given character. *
* *
***************************************************************************
* *
* Synopsis : repchrstr () *
* *
* Parameters : *
* (char *) string : The string pointer to string which has to be *
* transformed. *
* (char) srchchar : The character which has to be replaced. *
* (char) repchar ; The character which replaces the srchchar. *
* *
* Return value : (char *) *
* Same pointer as string. *
* *
***************************************************************************/
char *repchrstr (char *string, char srchchar, char repchar)
{
char *strp;
strp = string;
while (strp = strchr (strp, srchchar))
*strp = repchar;
return (string);
}